 <%
 User user1 = (User) session.getAttribute("sessionlogin");
                    %>
<%@page import="Model.User"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.Connection"%>
<%@page import="Model.ConnectDatabase"%>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<div id="lefside">
    <div id="advanceSearch">
        <h3 class="headbox">TÌM KIẾM NÂNG CAO</h3>
        <div class="centerbox">
            <form action="Search.jsp" method="get" id="MobileSearch" name="MobileSearch">
                 <select size="1" id="chooseProducer" class="selectbox" name="manufacturer">
                    <option value="">&nbsp;Chọn nhà sản xuất</option>
                    <%
                                Connection con1 = ConnectDatabase.getConnection();
                                Statement sta1 = con1.createStatement();
                                String sql1 = "SELECT * FROM manufacturer";
                                ResultSet re1 = sta1.executeQuery(sql1);
                                while (re1.next()) {
                    %>
                    <option value="<%=re1.getInt(1)%>"><%=re1.getString(2)%></option>
                    <%}%>

                </select>

                 <select size="1" id="pr" name="price" class="selectbox">
                    <option value="">&nbsp;&nbsp;&nbsp;&nbsp;Chọn mức giá</option>
                    <option value="1">Dưới 1 triệu</option>
                    <option value="2">Từ 1 -&gt; 3 triệu</option>
                    <option value="3">Từ 3 -&gt; 5 triệu</option>
                    <option value="4">Từ 5 -&gt; 8 triệu</option>
                    <option value="5">Từ 8 -&gt; 12 triệu</option>
                    

                </select>

                <select size="1" id="os" name="os" class="selectbox">
                    <option value="">&nbsp;Chọn hệ điều hành</option>
                    <%
                                Connection con2 = ConnectDatabase.getConnection();
                                Statement sta2 = con2.createStatement();
                                String sql2 = "SELECT * FROM operatingsystem ";
                                ResultSet re2 = sta2.executeQuery(sql2);
                                while (re2.next()) {
                    %>
                    <option value="<%=re2.getInt(1)%>"><%=re2.getString(2)%></option>

                    <%}%>

                </select>
                <br />

                <input type="image" id="search" name="search" src="image/searchicon.png" width="64" height="64" title"Tìm kiếm"/>

            </form>           </div>
        <img src="image/support_bottom.png" />
    </div>
    <div class="blank"></div>
<%if(user1==null){%>
    <%@include file="loginbox.jsp" %>
<%}%>
    <div id="categoryProduct">
        <h3 id="headproducerbox">HÃNG SẢN XUẤT</h3>

        <ul>
            <%Connection con = ConnectDatabase.getConnection();
                        Statement sta = con.createStatement();
                        ResultSet res = sta.executeQuery("select * from manufacturer");
                        while (res.next()) {%>
            <li><a href="ViewByProducer?producer=<%=res.getInt(1)%>&name=<%=res.getString(2)%>"><%=res.getString(2)%></a></li>

            <%}
                        con.close();%>
        </ul>


    </div>

<!--    <div class="hotproduct">
        <h3 class="headhotproduct">SẢN PHẨM BÁN CHẠY</h3>

        <ul>
                      <marquee id="marqueelupTV" width="100%" height="190"  direction="up" scrolldelay="100" scrollamount="2" onmouseout="marqueelupTV.start()" onmouseover="marqueelupTV.stop()" id="marqueelupTV">
            <li>
                <a href="">
                    <img hspace="1" border="0" align="right"  vspace="1" class="img_border" title="Samsung I9000" alt="" src="mobilethumbnail/LG C305.jpg" />
                </a>
                <p>
                    <a href="" >Samsung I9000</a>
                    1600000
                </p>

            </li>
            <li><a href=""><img hspace="1" border="0" align="right"  vspace="1" class="img_border" title="Samsung I9000" alt="" src=imagemobile/small_e1175.jpg /></a>
                <p>
                    <a href="" >Samsung I9000</a>
                    1600000
                </p>
            </li>

            <li><a href=""><img hspace="1" border="0" align="right"  vspace="1" class="img_border" title="Samsung I9000" alt="" src=imagemobile/small_e1175.jpg /></a>
                <p>
                    <a href="" >Samsung I9000</a>
                    1600000
                </p>
            </li>
                        </marquee>
        </ul>


    </div>-->

    <div id="contactadmin">
        <h3 class="headbox">Liên hệ admin</h3>
        <div class="centerbox" id="sigin">

            <div>
                <a href=" ymsgr:sendim?contimnguctu123">
                    <img border="0" src="http://opi.yahoo.com/online?u=contimnguctu123&amp;m=g&amp;t=6"/>
                </a>
                <div style="font-weight:bold;padding:10px;color:red;">Điện thoại 0973523627</div>
            </div>


        </div>
        <img src="image/support_bottom.png" />
    </div>
</div>
